import request from '@/axios'
import { SysImportantApiLogDetailVo, SysImportantApiLogEditQo, SysImportantApiLogListVo, SysImportantApiLogSearchQo } from './types'
import { BaseDeleteQo } from '@/base/api/BaseQo'
import { KeyLabelValueVo } from '@/base/api/KeyLabelValueVo'

export const sysImportantApiLogPageApi = (data: SysImportantApiLogSearchQo): Promise<IResponse<Array<SysImportantApiLogListVo>>> => {
  return request.post({ url: '/sysImportantApiLog/page.adw', data })
}

export const sysImportantApiLogDetailApi = (id: number): Promise<IResponse<SysImportantApiLogDetailVo>> => {
  const data = { id }
  return request.post({
    url: '/sysImportantApiLog/detail.adw',
    data
  })
}

export const sysImportantApiLogAddApi = (data: SysImportantApiLogEditQo): Promise<IResponse<number>> => {
  return request.post({ url: '/sysImportantApiLog/add.adw', data })
}

export const sysImportantApiLogUpdateApi = (data: SysImportantApiLogEditQo): Promise<IResponse<void>> => {
  return request.post({ url: '/sysImportantApiLog/update.adw', data })
}

export const sysImportantApiLogDeleteApi = (data: BaseDeleteQo): Promise<IResponse<void>> => {
  return request.post({ url: '/sysImportantApiLog/delete.adw', data })
}

// [[ OnflowGenerator Range (- selectFunctions -) Start ]]

// [[ OnflowGenerator Range (- selectFunctions -) End ]]
